package mspbots.data.tl.prod.jira.model;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import mspbots.data.tl.entity.BaseTenantEntity;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Builder
@EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
@NoArgsConstructor
@TableName("jira_issue")
public class JiraIssue extends BaseTenantEntity {

    //id
    private Long issueId;
    //key
    private String key;

    /**
     * he following are all in this field:[fields].
     * */

    //summary
    private String summary;
    //description
    private String description;
    //The source data[fixVersions] is an array type, save "name" of split ","
    //"fixVersions":[
    //            {
    //                "self":"https://jira.mspbots.ai/rest/api/2/version/13200",
    //                "id":"13200",
    //                "description":"",
    //                "name":"1.20",
    //                "archived":false,
    //                "released":false,
    //                "releaseDate":"2020-08-19"
    //            }
    //        ]
    private String fixVersionsNames;
    // The source data[customfield_10100] is an array type,
//    "customfield_10100":[
//            "com.atlassian.greenhopper.service.sprint.Sprint@762d6183[id=19,rapidViewId=1,state=ACTIVE,name=Sprint 19,startDate=2020-05-06T08:30:07.257-05:00,endDate=2020-05-31T08:30:00.000-05:00,completeDate=&lt;null&gt;,activatedDate=2020-05-06T08:30:07.257-05:00,sequence=18,goal=&lt;null&gt;]"
//            ]
    private String sprintName;
    //customfield_10101 type is varchar
    //"customfield_10101":"MB-1272",
    private String epicLink;

    //customfield_10106
    //"customfield_10106":3.0,
    private Double storyPoints;

    //priority.name
    private String priorityName;

    //customfield_10300
    //"customfield_10300": "5",
    private String teamName;
    //issuetype.name
    private String typeName;
    //creator.displayName
    private String creatorDisplayName;
    //project.name
    private String projectName;
    //duedate
    private LocalDate dueDate;
    //assignee.displayName
    private String assigneeDisplayName;
    //status.name
    private String statusName;
    //"created":"2020-03-01T20:26:04.000-0600"
    private LocalDateTime createTime;
    //"updated":"2020-03-01T20:26:04.000-0600"
    private LocalDateTime updateTime;

    private LocalDateTime syncTime;
}
